<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Carbon\Carbon;
class DawnUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // 生成 5 条测试数据，你可以根据需要调整数量
        for ($i = 1; $i <= 5; $i++) {
            DB::table('dawn_users')->insert([
                'dawn_name' => "user{$i}",
                'dawn_password' => Hash::make("password{$i}"),
                'dawn_createTime' => Carbon::now(),
                'dawn_lastTime' => Carbon::now(),
                'dawn_updatatime' => Carbon::now(),
                'dawn_Status' => rand(0, 1), // 随机生成 0 或 1 作为账户状态
            ]);
        }
    }
}
